/*
 * @Author: yangni 920556271@qq.com
 * @Date: 2023-12-06 09:16:06
 * @LastEditors: yangni 920556271@qq.com
 * @LastEditTime: 2024-04-09 10:16:38
 * @FilePath: /yt-devops/lib/utils/self_develop_formate.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import 'package:get/get.dart';

import '../resources/str_res_keys.dart';

class SelfDevelopFormate {
  static String doorFormat(int value) {
    final map = {
      0: ResKey.close.tr,
      1: ResKey.open.tr,
    };
    return map[value] ?? '';
  }

  static String closeFormat(int value) {
    final map = {
      0: ResKey.close.tr,
      1: ResKey.open.tr,
    };
    return map[value] ?? '';
  }

  static String faultFormat(int value) {
    final map = {"0": ResKey.normal.tr, "1": "ResKey.alarm.tr"};
    return map[value.toString()] ?? '';
  }

  static String electricModelFormat(int value) {
    final map = {
      0: ResKey.thingsBatteryConstantVoltage.tr,
      1: ResKey.thingsGridConnectedConstantCurrent.tr,
      2: ResKey.thingsBatteryConstantCurrent.tr,
    };
    return map[value] ?? '';
  }

  static String pankFanAlarmFormat(value) {
    final map = {"0": ResKey.normal.tr, "1": "ResKey.alarm.tr"};

    return map[value.toString()] ?? '';
  }

  static String airsetFormat(int value) {
    final map = {"0": ResKey.thingsCease.tr, "1": " ResKey.thingsRun.tr, //运行"};

    return map[value.toString()] ?? '';
  }
}
